Skip to content

Backport hybrid search filter and CI fixes to release/1.4.0 - #253

Merged
hnwyllmm merged 1 commit into
oceanbase:release/1.4.0from
hnwyllmm:codex/backport-252-release-1.4.0
Aug 3, 2026
Merged

hnwyllmm merged 1 commit into
oceanbase:release/1.4.0from
hnwyllmm:codex/backport-252-release-1.4.0

Conversation

@hnwyllmm

@hnwyllmm hnwyllmm commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Backport #252 to release/1.4.0.

  • Restrict the quoted JSON_EXTRACT rewrite so hybrid-search metadata filters are not corrupted.
  • Make CI validate the final non-empty pytest summary line and reject failure/error outcomes.
  • Add regression coverage for both SQL rewriting and pytest-summary detection.

Source

Validation

  • 12 passed — targeted unit tests
  • 7 passed, 14 deselected — embedded hybrid-search integration tests
  • bash -n .github/scripts/check-pytest-summary.sh
  • .venv/bin/prek run -a

…e#252)

## Summary

- constrain the `DBMS_HYBRID_SEARCH.GET_SQL` rewrite to backtick-quoted
`JSON_EXTRACT(...)` expressions
- preserve ordinary quoted identifiers in filtered BM25, KNN, and
combined hybrid-search SQL
- keep the pytest-summary fallback required by `pylibseekdb`, but fail
on positive `failed`/`error(s)` counts and on missing successful
summaries
- add regression tests for both the SQL rewrite and CI summary parsing

Fixes oceanbase#251.

## Root cause

The previous regex could start at the closing backtick of one ordinary
identifier and end at the opening backtick of another whenever an
unquoted `JSON_EXTRACT` appeared between them. That produced malformed
SQL for metadata-filtered hybrid searches.

The integration tests already caught this regression, but the CI
fallback required a literal `=======` in pytest's final line. When the
summary format did not contain that exact marker, the `|| exit 0` branch
marked the job successful even with failures.

## Validation

- `pytest tests/unit_tests/test_hybrid_search_sql_rewrite.py
tests/unit_tests/test_ci_pytest_summary.py -q` — 11 passed
- `pytest tests/integration_tests/test_collection_hybrid_search.py -k
embedded -q` — 7 passed
- all four hybrid-search cases that failed in PR oceanbase#240's embedded job now
pass
- `prek run -a` — all checks passed

Local full-unit-suite note: 463 tests passed and 318 skipped; 6 existing
sentence-transformer tests failed because the local `transformers`
installation imports an unavailable `huggingface_hub.is_offline_mode`.
This is unrelated to the changed files.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved hybrid search SQL handling so quoted identifiers remain
intact while supported JSON extraction expressions are processed
correctly.
* Added validation to ensure test runs report a valid, passing pytest
summary.

* **Tests**
* Added coverage for successful, failed, interrupted, missing, and empty
test summaries.
* Added regression tests for hybrid search SQL rewriting, including
quoted identifiers and JSON extraction expressions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 84b81f53-f78d-4f97-a1cf-92d7a2034278

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hnwyllmm
hnwyllmm marked this pull request as ready for review August 3, 2026 08:52
@hnwyllmm
hnwyllmm merged commit faf17e0 into oceanbase:release/1.4.0 Aug 3, 2026
2 checks passed
@hnwyllmm
hnwyllmm deleted the codex/backport-252-release-1.4.0 branch August 3, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant